<template>
  <div>
    <h3>这是根组件</h3>

    <button @click="fn1">请求所有的学员信息</button>
  </div>
</template>

<script>
import axios from 'axios'

export default {
  methods: {
    // async fn() {
    //   const { data } = await axios('http://localhost:8080/students')
    //   console.log(data)
    // },
    async fn1() {
      // 来自于不同的第三方的数据
      const { data: res1 } = await axios('http://localhost:8080/chen1/students')
      console.log(res1)
      const { data: res2 } = await axios('http://localhost:8080/chen2/cars')
      console.log(res2)
    }
  }
}
</script>
